﻿@model DJY.Domain._02_ViewModel.WorkFlowInstance
@using DJY.Code.Helper
@using DJY.Domain.ViewModel
@using DJY.Domain._02_ViewModel

@{
    AskForLeave form = WorkFlowNodeProperty.ConvertTo<AskForLeave>(Model.node.properties);
}

<script src="~/Content/js/datepicker/WdatePicker.js"></script>

<div class="row flow-model-key required">
    <div class="col-sm-2 flow-name required">
        起始时间
    </div>
    <div class="col-sm-3 flow-key required" data-key="startTime" data-type="1">
        <input name="startTime" id="startTime" value="@form.startTime" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:00:00'})" placeholder="起始时间" />
    </div>
    <div class="col-sm-2 flow-name required">
        截至时间
    </div>
    <div class="col-sm-3 flow-key required" data-key="startTime" data-type="1">
        <input name="endTime" id="endTime" value="@form.endTime" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:00:00',minDate:'#F{$dp.$D(\'startTime\')}'})" placeholder="截至时间" />
    </div>
</div>
<div class="row flow-model-key required">
    <div class="col-sm-2 flow-name required">
        请假类型
    </div>
    <div class="col-sm-9 flow-key required" data-key="type" data-type="1" data-single="true">
        <input type="radio" name="type" id="rbtnEvent" data-key="type" value="event" @(form.type == "event"?"checked":"")/><label for="rbtnEvent">事假</label>
        <input type="radio" name="type" id="rbtnSick" data-key="type" value="sick" @(form.type == "sick"?"checked":"")/><label for="rbtnSick">病假</label>
        <input type="radio" name="type" id="rbtnBreak" data-key="type" value="break" @(form.type == "break"?"checked":"")/><label for="rbtnBreak">调休</label>
    </div>
</div>
<div class="row flow-model-key required">
    <div class="col-sm-2 flow-name required">
        请假事由
    </div>
    <div class="col-sm-9 flow-key required" data-key="reason" data-type="1">
        @Html.TextArea("txtReason",form.reason,new { style="height:60px;",@class="form-control"})
    </div>
</div>

